package com.hfzy.ihk.web.aliyuncall.context;


import com.hfzy.ihk.web.aliyuncall.biz.AliyunCallStateBiz;
import com.hfzy.ihk.web.aliyuncall.support.cloudcall.handler.AliyunRecordFileHandler;
import com.hfzy.ihk.web.aliyuncall.support.cloudcall.handler.asrcall.AliyunAsrCallOutHandler;
import com.hfzy.ihk.web.aliyuncall.support.cloudcall.handler.asrcall.AliyunAsrCallStateHandler;
import com.hfzy.ihk.web.aliyuncall.support.cloudcall.handler.doublecall.AliyunCallOutHandler;
import com.hfzy.ihk.web.aliyuncall.support.cloudcall.handler.doublecall.AliyunCallStateHandler;
import org.springframework.core.task.TaskExecutor;

/**
 * Created by xzz on 2016/6/14.
 */
public class BeanUtils {



    public static DisruptorInitBean getDisruptorInitBean() {
        return (DisruptorInitBean) CloudCallInitializingBean.getApplicationContext().getBean("disruptorInitBean");
    }

    public static TaskExecutor getTaskExecutor(){
        return (TaskExecutor) CloudCallInitializingBean.getApplicationContext().getBean("taskExecutor");
    }

//    public static AliyunCallOutBiz getAliyunCallOutBiz(){
//        return (AliyunCallOutBiz) CloudCallInitializingBean.getApplicationContext().getBean("aliyunCallOutBiz");
//    }
//
//    public static AliyunCallStateBiz getAliyunCallStateBiz(){
//        return (AliyunCallStateBiz) CloudCallInitializingBean.getApplicationContext().getBean("aliyunCallStateBiz");
//    }
//
//    public static AliyunRecordFileBiz getAliyunRecordFileBiz(){
//        return (AliyunRecordFileBiz) CloudCallInitializingBean.getApplicationContext().getBean("aliyunRecordFileBiz");
//    }



    public static AliyunCallOutHandler getAliyunCallOutHandler(){
        return (AliyunCallOutHandler) CloudCallInitializingBean.getApplicationContext().getBean("aliyunCallOutHandler");
    }




    public static AliyunAsrCallOutHandler getAliyunAsrCallOutHandler(){
        return (AliyunAsrCallOutHandler) CloudCallInitializingBean.getApplicationContext().getBean("aliyunAsrCallOutHandler");
    }


    public static AliyunCallStateHandler getAliyunCallStateHandler(){
        return (AliyunCallStateHandler) CloudCallInitializingBean.getApplicationContext().getBean("aliyunCallStateHandler");
    }


    public static AliyunAsrCallStateHandler getAliyunAsrCallStateHandler(){
        return (AliyunAsrCallStateHandler) CloudCallInitializingBean.getApplicationContext().getBean("aliyunAsrCallStateHandler");
    }


    public static AliyunRecordFileHandler getAliyunRecordFileHandler(){
        return (AliyunRecordFileHandler) CloudCallInitializingBean.getApplicationContext().getBean("aliyunRecordFileHandler");
    }

    public static AliyunCallStateBiz getAliyunCallStateBiz(){
        return (AliyunCallStateBiz) CloudCallInitializingBean.getApplicationContext().getBean("aliyunCallStateBiz");
    }

}
